using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._CrimeAnalysisandSafetyTools
{
    /// <summary>
    /// <para>Find Space Time Matches</para>
    /// <para>Identifies matches between two feature classes based on proximity, time extent, or both.</para>
    /// <para>根据邻近度和/或时间范围来识别两个要素类之间的匹配项。</para>
    /// </summary>    
    [DisplayName("Find Space Time Matches")]
    public class FindSpaceTimeMatches : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public FindSpaceTimeMatches()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_primary_features">
        /// <para>Input Primary Features</para>
        /// <para>The primary input feature class.</para>
        /// <para>主输入要素类。</para>
        /// </param>
        /// <param name="_in_comparison_features">
        /// <para>Input Comparison Features</para>
        /// <para>The comparison input feature class.</para>
        /// <para>比较输入要素类。</para>
        /// </param>
        /// <param name="_out_primary_feature_class">
        /// <para>Output Matched Primary Features</para>
        /// <para>The output feature class containing features from the input primary features where output match types occurred.</para>
        /// <para>输出要素类，包含发生输出匹配类型的输入主要要素中的要素。</para>
        /// </param>
        /// <param name="_out_comparison_feature_class">
        /// <para>Output Matched Comparison Features</para>
        /// <para>The output feature class containing features from input comparison features where output match types occurred.</para>
        /// <para>输出要素类，包含发生输出匹配类型的输入比较要素中的要素。</para>
        /// </param>
        /// <param name="_match_types">
        /// <para>Output Match Types</para>
        /// <para><xdoc>
        ///   <para>Specifies the types of matches to compare.</para>
        ///   <bulletList>
        ///     <bullet_item>Space and time—Matches based on both the time extent and proximity defined in the temporal and spatial search radius will be compared, for example, 25 meters and 10 minutes.</bullet_item><para/>
        ///     <bullet_item>Space only—Matches based only on the proximity defined in the spatial search radius will be compared, for example, 25 meters.</bullet_item><para/>
        ///     <bullet_item>Time only—Matches based only on the time extent defined in the temporal search radius will be compared, for example, 10 minutes.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定要比较的匹配项类型。</para>
        ///   <bulletList>
        ///     <bullet_item>空间和时间—将比较基于时间和空间搜索半径中定义的时间范围和邻近度的匹配，例如 25 米和 10 分钟。</bullet_item><para/>
        ///     <bullet_item>仅空间—将比较仅基于空间搜索半径中定义的邻近度的匹配项，例如 25 米。</bullet_item><para/>
        ///     <bullet_item>仅时间—将比较仅基于在时态搜索半径中定义的时间范围的匹配项，例如 10 分钟。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        public FindSpaceTimeMatches(object _in_primary_features, object _in_comparison_features, object _out_primary_feature_class, object _out_comparison_feature_class, List<object> _match_types)
        {
            this._in_primary_features = _in_primary_features;
            this._in_comparison_features = _in_comparison_features;
            this._out_primary_feature_class = _out_primary_feature_class;
            this._out_comparison_feature_class = _out_comparison_feature_class;
            this._match_types = _match_types;
        }
        public override string ToolboxName => "Crime Analysis and Safety Tools";

        public override string ToolName => "Find Space Time Matches";

        public override string CallName => "ca.FindSpaceTimeMatches";

        public override List<string> AcceptEnvironments => ["MDomain", "MResolution", "MTolerance", "XYDomain", "XYResolution", "XYTolerance", "ZDomain", "ZResolution", "ZTolerance", "autoCommit", "configKeyword", "extent", "geographicTransformations", "maintainAttachments", "outputCoordinateSystem", "outputMFlag", "outputZFlag", "outputZValue", "qualifiedFieldNames", "scratchWorkspace", "workspace"];

        public override object[] ParameterInfo => [_in_primary_features, _in_comparison_features, _out_primary_feature_class, _out_comparison_feature_class, _match_types, _search_radius, _temporal_search_radius, _primary_start_date_field, _comparison_start_date_field, _primary_end_date_field, _comparison_end_date_field];

        /// <summary>
        /// <para>Input Primary Features</para>
        /// <para>The primary input feature class.</para>
        /// <para>主输入要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Primary Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_primary_features { get; set; }


        /// <summary>
        /// <para>Input Comparison Features</para>
        /// <para>The comparison input feature class.</para>
        /// <para>比较输入要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Comparison Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_comparison_features { get; set; }


        /// <summary>
        /// <para>Output Matched Primary Features</para>
        /// <para>The output feature class containing features from the input primary features where output match types occurred.</para>
        /// <para>输出要素类，包含发生输出匹配类型的输入主要要素中的要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Matched Primary Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_primary_feature_class { get; set; }


        /// <summary>
        /// <para>Output Matched Comparison Features</para>
        /// <para>The output feature class containing features from input comparison features where output match types occurred.</para>
        /// <para>输出要素类，包含发生输出匹配类型的输入比较要素中的要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Matched Comparison Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_comparison_feature_class { get; set; }


        /// <summary>
        /// <para>Output Match Types</para>
        /// <para><xdoc>
        ///   <para>Specifies the types of matches to compare.</para>
        ///   <bulletList>
        ///     <bullet_item>Space and time—Matches based on both the time extent and proximity defined in the temporal and spatial search radius will be compared, for example, 25 meters and 10 minutes.</bullet_item><para/>
        ///     <bullet_item>Space only—Matches based only on the proximity defined in the spatial search radius will be compared, for example, 25 meters.</bullet_item><para/>
        ///     <bullet_item>Time only—Matches based only on the time extent defined in the temporal search radius will be compared, for example, 10 minutes.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定要比较的匹配项类型。</para>
        ///   <bulletList>
        ///     <bullet_item>空间和时间—将比较基于时间和空间搜索半径中定义的时间范围和邻近度的匹配，例如 25 米和 10 分钟。</bullet_item><para/>
        ///     <bullet_item>仅空间—将比较仅基于空间搜索半径中定义的邻近度的匹配项，例如 25 米。</bullet_item><para/>
        ///     <bullet_item>仅时间—将比较仅基于在时态搜索半径中定义的时间范围的匹配项，例如 10 分钟。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Match Types")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _match_types { get; set; }


        /// <summary>
        /// <para>Search Radius</para>
        /// <para>The radius used to search between input feature classes.</para>
        /// <para>用于在输入要素类之间搜索的半径。</para>
        /// <para>单位： Meters | Feet | Kilometers | Miles | Yards </para>
        /// </summary>
        [DisplayName("Search Radius")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public string? _search_radius { get; set; } = null;


        /// <summary>
        /// <para>Temporal Search Radius</para>
        /// <para>The time extent used to search between input feature classes.</para>
        /// <para>用于在输入要素类之间进行搜索的时间范围。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Temporal Search Radius")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _temporal_search_radius { get; set; } = null;


        /// <summary>
        /// <para>Primary Features Start Date Field</para>
        /// <para>The primary start date and time field of the input primary features.</para>
        /// <para>输入主要要素的主要开始日期和时间字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Primary Features Start Date Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _primary_start_date_field { get; set; } = null;


        /// <summary>
        /// <para>Comparison Features Start Date Field</para>
        /// <para>The comparison start date and time field of the input comparison features.</para>
        /// <para>输入比较要素的比较开始日期和时间字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Comparison Features Start Date Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _comparison_start_date_field { get; set; } = null;


        /// <summary>
        /// <para>Primary Features End Date Field</para>
        /// <para>The primary end date and time field of the input primary features. When specified, the time range defined by the start and end date and the temporal search radius will be used to search comparison features. The temporal search radius can be set to 0 to compare only the time defined by the feature's time range.</para>
        /// <para>输入主要要素的主要结束日期和时间字段。指定后，将由开始日期和结束日期以及时态搜索半径定义的时间范围用于搜索比较要素。可以将时态搜索半径设置为 0，以仅比较要素时间范围定义的时间。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Primary Features End Date Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _primary_end_date_field { get; set; } = null;


        /// <summary>
        /// <para>Comparison Features End Date Field</para>
        /// <para>The comparison end date and time field of the input comparison features. When specified, the time range defined by the start and end date and the temporal search radius will be used to evaluate relationships with primary features. The temporal search radius can be set to 0 to compare only the time defined by the feature's time range.</para>
        /// <para>输入比较要素的比较结束日期和时间字段。指定后，由开始日期和结束日期以及时态搜索半径定义的时间范围将用于评估与主要要素的关系。可以将时态搜索半径设置为 0，以仅比较要素时间范围定义的时间。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Comparison Features End Date Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _comparison_end_date_field { get; set; } = null;


        public FindSpaceTimeMatches SetEnv(object MDomain = null, object MResolution = null, object MTolerance = null, object XYDomain = null, object XYResolution = null, object XYTolerance = null, object ZDomain = null, object ZResolution = null, object ZTolerance = null, int? autoCommit = null, object configKeyword = null, object extent = null, object geographicTransformations = null, object outputCoordinateSystem = null, object outputMFlag = null, object outputZFlag = null, object outputZValue = null, bool? qualifiedFieldNames = null, object scratchWorkspace = null, object workspace = null)
        {
            base.SetEnv(MDomain: MDomain, MResolution: MResolution, MTolerance: MTolerance, XYDomain: XYDomain, XYResolution: XYResolution, XYTolerance: XYTolerance, ZDomain: ZDomain, ZResolution: ZResolution, ZTolerance: ZTolerance, autoCommit: autoCommit, configKeyword: configKeyword, extent: extent, geographicTransformations: geographicTransformations, outputCoordinateSystem: outputCoordinateSystem, outputMFlag: outputMFlag, outputZFlag: outputZFlag, outputZValue: outputZValue, qualifiedFieldNames: qualifiedFieldNames, scratchWorkspace: scratchWorkspace, workspace: workspace);
            return this;
        }

    }

}